package exemplesLwpf;

import core.ObjectePersistentAbst;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created with IntelliJ IDEA.
 * User: Jordi
 * Date: 7/01/13
 * Time: 18:21
 * To change this template use File | Settings | File Templates.
 */
public class actor extends ObjectePersistentAbst implements Serializable, Cloneable {

    public actor(){}
        protected Integer actor_id;
        protected String first_name;
        protected String last_name;
        protected java.sql.Timestamp last_update;


    public Integer getActor_id(){
        return this.actor_id;
    }

    public void setActor_id (Integer actor_id){
     if(!isCarregant()){
         if(actor_id == null){
             throw new IllegalArgumentException("El camp actor_id esta buit!");
         }
         if (!actor_id.equals(this.actor_id)){
             this.modificat = true ;
         }
     }
        this.actor_id = actor_id;
    }

    public String getFirst_name(){
        return this.first_name;
    }

    public void setFirst_name (String first_name){
     if(!isCarregant()){
         if(first_name == null){
             throw new IllegalArgumentException("El camp first_name esta buit");
         }
         if(!first_name.equals(this.first_name)){
             this.modificat = true;
         }
     }
        this.first_name =first_name;
    }

    public String getLast_name(){
        return this.last_name;
    }

    public void setLast_name (String last_name){
        if(!isCarregant()){
            if(last_name == null){
                throw new IllegalArgumentException("El camp last_name esta buit");
            }
            if(!last_name.equals(this.last_name)){
                this.modificat = true;
            }
        }
        this.last_name =last_name;
    }

    public Timestamp getLast_update(){
        return this.last_update;
    }

    public void setLast_update(Timestamp last_update){
        if(!isCarregant()){
            if(last_update ==null){
                throw new IllegalArgumentException("El camp last_update esta buit");
            }
            if(!last_update.equals(this.last_update)){
                this.modificat=true;
            }
        }
        this.last_update=last_update;
    }

}
